package com.example.program.demos.service;

import com.example.program.demos.mapper.ProgramMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ProgramService {
    @Autowired
    ProgramMapper programMapper;
    public List<Map<String, Object>> selectPrograms(int companyId) {
        return programMapper.selectPrograms(companyId);
    }

    public List<Map<String, Object>> selectCompanys() {
        return programMapper.selectCompanys();
    }

    public void insertCompany(String companys) {
        programMapper.insertCompany(companys);
    }

    public void insertPrograms(Map<String, Object> programInfs) {
        programMapper.insertPrograms(programInfs);
    }

    public List<Map<String, Object>> selectGroups(int programId) {
        return programMapper.selectGroups(programId);
    }
}
